﻿using L.UI.Base;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class SpacePanel : BasePanel
{
    private string lookName = "Earth";
    private void Start()
    {
        AddOnClickListener("Earth", Look);
        AddOnClickListener("Sun", Look);
        AddOnClickListener("Moon", Look);
    }

    private void Look(string btnName)
    {
        GetImage(lookName).enabled = false;
        GetImage(btnName).enabled = true;
        lookName = btnName;
        ActionManager.Instance.Look?.Invoke(btnName);
    }


    public override void InitUI()
    {
        base.InitUI();
        Look("Earth");
    }
}
